{% extends 'site/layout.html' %}
{% load staticfiles %}

{% block search-form %}
    {% include "partials/search_form.html" %}
{% endblock search-form %}

{% block main-content-container %}
    <div id="map-container">

        {% block main-content %}{% endblock %}
    </div>
{% endblock %}

{# No footer on the map page #}
{% block footer %}{% endblock footer %}

{% block extrascripts %}
    {{ block.super }}

    <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true&amp;libraries=places,adsense,geometry&amp;language=pl"></script>
    <script type="text/javascript" src="{% static "libs/jquery.hotkeys.js" %}"></script>
    <script type="text/javascript" src="{% static "js/btsearch.map.js" %}?v={{ version }}"></script>

    <script type="text/javascript">
        $(document).ready(function(){
            core.init(document.getElementById("map"), {
                bounds: {% if request.GET.bounds %}'{{ request.GET.bounds }}'{% else %}null{% endif %},  // '51.944564,15.462614,51.9621,15.503469',
                center: {% if request.GET.center %}'{{ request.GET.center }}'{% else %}null{% endif %},
                zoom: {% if request.GET.zoom %}{{ request.GET.zoom }}{% else %}null{% endif %},
                dataSource: {% if request.GET.dataSource %}'{{ request.GET.dataSource }}'{% else %}null{% endif %},
                network: {% if request.GET.network %}'{{ request.GET.network }}'{% else %}null{% endif %},
                standards: {% if request.GET.standards %}'{{ request.GET.standards }}'{% else %}null{% endif %},
                bands: {% if request.GET.bands %}'{{ request.GET.bands }}'{% else %}null{% endif %}
            });
        });
    </script>
{% endblock extrascripts %}